<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // function fn(){
      //   console.log(100)
      // }
      // console.log(fn())
        // 求和数组封装练习
      // function sum(a,b){
      //   let j = a + b
      //   return j
      // }
      // let h = sum(5,2)

      // console.log(h)

      // 封装余额函数
      function arr(){
        let a = +prompt('请输入银行卡余额：')
        let b = +prompt('请输入当月食宿消费金额：')
        let c = +prompt('请输入当月生活费消费金额：')
        let d = a-b-c
        return d
      }
      let yue = arr()
      console.log(yue)
    </script>
  </body>
</html>
